;Assembler header file for Iconbar
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:07:20 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 5 Sept 1995

        [       :LNOT: :DEF: Iconbar_Hdr
        GBLS    Iconbar_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

;Symbols for constants
Class_Iconbar                   *       &82900
Error_IconbarAllocFailed        *       &80AB01
Error_IconbarShortBuffer        *       &80AB02
Error_IconbarBadObjectVersion   *       &80AB03
Error_IconbarBadFlags           *       &80AB04
Error_IconbarNoSuchTask         *       &80AB11
Error_IconbarNoSuchMethod       *       &80AB12
Error_IconbarNoSuchMiscOpMethod *       &80AB13
Error_IconbarWrongShowType      *       &80AB14
Error_IconbarNoText             *       &80AB20
Error_IconbarTasksActive        *       &80AB21
Iconbar_GenerateSelectAboutToBeShown *       &1
Iconbar_GenerateAdjustAboutToBeShown *       &2
Iconbar_SelectIsMenu            *       &4
Iconbar_AdjustIsMenu            *       &8
Iconbar_HasText                 *       &10
Iconbar_GenerateSelectClicked   *       &20
Iconbar_GenerateAdjustClicked   *       &40
Iconbar_ShowSelectCentered      *       &80
Iconbar_ShowAdjustCentered      *       &100
Iconbar_ShowSelectAtPointer     *       &200
Iconbar_ShowAdjustAtPointer     *       &400
Action_IconbarClicked           *       &82900
Action_IconbarSelectAboutToBeShown *       &82901
Action_IconbarAdjustAboutToBeShown *       &82902
Iconbar_Select                  *       &1
Iconbar_Adjust                  *       &2
Iconbar_ClickedAdjust           *       &1
Iconbar_ClickedSelect           *       &4

;Symbols for structure offsets and sizes
                                ^       0
                                #       Bits
Iconbar_Flags                   *       @

                                ^       0
Iconbar_Object_flags            #       Iconbar_Flags
Iconbar_Object_position         #       Int
Iconbar_Object_priority         #       Int
Iconbar_Object_sprite_name      #       Toolbox_StringReference
Iconbar_Object_sprite_limit     #       Int
Iconbar_Object_text             #       Toolbox_MsgReference
Iconbar_Object_text_limit       #       Int
Iconbar_Object_menu             #       Toolbox_StringReference
Iconbar_Object_select_action    #       Bits
Iconbar_Object_adjust_action    #       Bits
Iconbar_Object_select_show      #       Toolbox_StringReference
Iconbar_Object_adjust_show      #       Toolbox_StringReference
Iconbar_Object_help_message     #       Toolbox_MsgReference
Iconbar_Object_help_limit       #       Int
Iconbar_Object                  *       @

                                ^       0
Iconbar_ObjectTemplate          Toolbox_ResourceFileObject_MEMBERS
Iconbar_ObjectTemplate_objectflags #       Iconbar_Flags
Iconbar_ObjectTemplate_position #       Int
Iconbar_ObjectTemplate_priority #       Int
Iconbar_ObjectTemplate_sprite_name #       Toolbox_StringReference
Iconbar_ObjectTemplate_sprite_limit #       Int
Iconbar_ObjectTemplate_text     #       Toolbox_MsgReference
Iconbar_ObjectTemplate_text_limit #       Int
Iconbar_ObjectTemplate_menu     #       Toolbox_StringReference
Iconbar_ObjectTemplate_select_action #       Bits
Iconbar_ObjectTemplate_adjust_action #       Bits
Iconbar_ObjectTemplate_select_show #       Toolbox_StringReference
Iconbar_ObjectTemplate_adjust_show #       Toolbox_StringReference
Iconbar_ObjectTemplate_help_message #       Toolbox_MsgReference
Iconbar_ObjectTemplate_help_limit #       Int
Iconbar_ObjectTemplate          *       @

Iconbar_Full                    *       Toolbox_Full

Iconbar_ActionClickedBlock      *       Toolbox_ActionHeaderBase

                                ^       0
Iconbar_ActionAboutToBeShown_tag #       Toolbox_PositionTag
Iconbar_ActionAboutToBeShown_position *       @
Iconbar_ActionAboutToBeShown_position_top_left #       OS_Coord
                                ^       Iconbar_ActionAboutToBeShown_position
Iconbar_ActionAboutToBeShown_position_full #       Iconbar_Full
Iconbar_ActionAboutToBeShown    *       @

                                ^       0
Iconbar_ActionSelectAboutToBeShown_o #       Toolbox_O
Iconbar_ActionSelectAboutToBeShown *       @

                                ^       0
Iconbar_ActionAdjustAboutToBeShown_o #       Toolbox_O
Iconbar_ActionAdjustAboutToBeShown *       @

                                ^       0
Iconbar_ActionSelectAboutToBeShownBlock Toolbox_ActionHeader_MEMBERS
Iconbar_ActionSelectAboutToBeShownBlock_o #       Toolbox_O
Iconbar_ActionSelectAboutToBeShownBlock *       @

                                ^       0
Iconbar_ActionAdjustAboutToBeShownBlock Toolbox_ActionHeader_MEMBERS
Iconbar_ActionAdjustAboutToBeShownBlock_o #       Toolbox_O
Iconbar_ActionAdjustAboutToBeShownBlock *       @

                                ^       0
                                #       Bits
Iconbar_SetButton               *       @


;Symbols for SWI's and SWI reason codes
XIconbar_ClassSWI               *       &A2900
Iconbar_ClassSWI                *       &82900

XIconbar_PostFilter             *       &A2901
Iconbar_PostFilter              *       &82901

XIconbar_PreFilter              *       &A2902
Iconbar_PreFilter               *       &82902

Iconbar_GetIconHandle           *       &0
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &0
   ;Exit
   ;  R0 = i (Wimp_I)

Iconbar_SetMenu                 *       &1
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &1
   ;  R3 = menu (Toolbox_O)

Iconbar_GetMenu                 *       &2
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &2
   ;Exit
   ;  R0 = menu (Toolbox_O)

Iconbar_SetAction               *       &3
   ;Entry
   ;  R0 = flags (Iconbar_SetButton)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &3
   ;  R3 = select_action (Bits)
   ;  R4 = adjust_action (Bits)

Iconbar_GetAction               *       &4
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &4
   ;Exit
   ;  R0 = select_action (Int)
   ;  R1 = adjust_action (Int)

Iconbar_SetShow                 *       &5
   ;Entry
   ;  R0 = flags (Iconbar_SetButton)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &5
   ;  R3 = select (Toolbox_O)
   ;  R4 = adjust (Toolbox_O)

Iconbar_GetShow                 *       &6
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &6
   ;Exit
   ;  R0 = select (Toolbox_O)
   ;  R1 = adjust (Toolbox_O)

Iconbar_SetHelpMessage          *       &7
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &7
   ;  R3 -> help_message (String)

Iconbar_GetHelpMessage          *       &8
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &8
   ;  R3 = buffer (pointer to String)
   ;  R4 = size (Int)
   ;Exit
   ;  R4 = used (Int)

Iconbar_SetText                 *       &9
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &9
   ;  R3 -> text (String)

Iconbar_GetText                 *       &A
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &A
   ;  R3 = buffer (pointer to String)
   ;  R4 = size (Int)
   ;Exit
   ;  R4 = used (Int)

Iconbar_SetSprite               *       &B
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &B
   ;  R3 -> sprite_name (String)

Iconbar_GetSprite               *       &C
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = iconbar (Toolbox_O)
   ;  R2 = &C
   ;  R3 = buffer (pointer to String)
   ;  R4 = size (Int)
   ;Exit
   ;  R4 = used (Int)

        ]
        END
